
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title></title>
    <link rel="stylesheet" href="__PUBLIC__/Mobile/xym/css/sm.css">
    <link rel="stylesheet" href="__PUBLIC__/Mobile/xym/css/sm-extend.css">
</head>
<body>
<div class="page-group">
    <div id="page-layout" class="page">
        <header class="bar bar-nav">
            <a class="button button-link button-nav pull-left back" href="/demos/form">
                <span class="icon icon-left"></span>
                返回
            </a>
            <h1 class="title">个人信息</h1>
        </header>
        <div class="content">
            <div class="list-block">
                <ul>
                    <!-- Text inputs -->
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-name"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">姓名</div>
                                <div class="item-input">
                                    <input type="text" id="true_name" placeholder="请输入您的姓名" value="{$my.true_name}">
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-gender"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">性别</div>
                                <div class="item-input">
                                    <select id="sex">
                                        <option value="1">男</option>
                                        <if condition="$my.sex eq 0">
                                            <option value="0" selected>女</option>
                                            <else/>
                                            <option value="0" >女</option>
                                        </if>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-email"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">邮箱</div>
                                <div class="item-input">
                                    <input type="email" id="email" placeholder="请输入您的邮箱" value="{$my.email}">
                                </div>
                            </div>
                        </div>
                    </li>
                    <li class="align-top">
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-comment"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">地址</div>
                                <div class="item-input">
                                    <textarea id="addr">{$my.addr}</textarea>
                                </div>
                            </div>
                        </div>
                    </li>
                    <!-- <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-email"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">手机号</div>
                                <div class="item-input">
                                    <input type="number" maxlength="11" id="mobile" placeholder="请输入您的手机号码" value="{$my.mobile}">
                                </div>
                            </div>
                        </div>
                    </li> -->
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-email"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">邮编</div>
                                <div class="item-input">
                                    <input type="number" maxlength="6" id="zip_code" placeholder="请输入6位数的邮编" value="{$my.zip_code}">
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-email"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">身份证号</div>
                                <div class="item-input">
                                    <input type="text" maxlength="18" id="card_id" placeholder="请输入您的身份证号码" value="{$my.card_id}">
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-email"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">银行卡号</div>
                                <div class="item-input">
                                    <input type="number" id="bankid" maxlength="20"  placeholder="请输入您的银行卡号" value="{$my.bankid}">
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="item-content">
                            <div class="item-media"><i class="icon icon-form-email"></i></div>
                            <div class="item-inner">
                                <div class="item-title label">开户行</div>
                                <div class="item-input">
                                    <input type="text" id="kaihuhang" placeholder="请输入开户行" value="{$my.kaihuhang}">
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="content-block">
                <div class="row">
                    <div class="col-100"><a href="#" class="button button-big button-fill button-success" id="save">提交</a></div>
                </div>
            </div>
        </div>
    </div>

</div>
<script type='text/javascript' src='__PUBLIC__/Mobile/xym/js/zepto.js' charset='utf-8'></script>
<script type='text/javascript' src='__PUBLIC__/Mobile/xym/js/sm.js' charset='utf-8'></script>
<script type='text/javascript' src='__PUBLIC__/Mobile/xym/js/sm-extend.js' charset='utf-8'></script>
<script>
    $(document).on('click', '#save', function () {
        var true_name=$("#true_name").val();
        var zip_code=$("#zip_code").val();
        var sex=$("#sex").attr("value");
        var email=$("#email").val();
        var card_id=$("#card_id").val();
        //var mobile=$("#mobile").val();
        var kaihuhang=$("#kaihuhang").val();
        var bankid=$("#bankid").val();
        var addr=$("#addr").attr("value");
        $.post("{:U('Myzzy/geren')}", {
            'true_name':true_name,
            'zip_code':zip_code,
            'sex':sex,
            'email':email,
            'kaihuhang':kaihuhang,
            'bankid':bankid,
            'addr':addr,
            //'mobile':mobile,
            'card_id':card_id,
        }, function (data) {
            if(data==1){
                $.alert("保存成功!");
            }else{
                $.alert("数据未做任何修改!");
            }
        })

    })
</script>
</body>
</html>